﻿namespace Order
{
    public class DetailFactory
    {
        readonly OrderDetail detail;
        public DetailFactory()
        {
            detail = new();
        }
        public void ChangeCommodity(string name, double price)
        {
            detail.Commodity.Name = name;
            detail.Commodity.Price = price;
        }
        public void ChangeAmount(int amount)
        {
            detail.Amount = amount;
        }
        public OrderDetail GetDetail()
        {
            return detail;
        }
    }
}
